1. Field of the Invention
This invention relates generally to data transmission codes for use in data communication systems and, more specifically, to a data transmission code, a method for encoding and decoding data into such a code, and a method of transmitting and receiving such a code for serial data communication. In particular, this invention relates to a data transmission code for use in serial, digital, data communications, having predetermined desired transmission characteristics, such as DC balance, run-length limit, error detection capabilities, and which is capable of being implemented in an AC coupled or DC coupled communication system in a cost-efficient manner by making new use of commercially available communications hardware, such as a Universal Asynchronous Receiver/Transmitter (UART).
2. Related Art
Digital data communication can be accomplished in many different ways using various combinations of hardware and software elements. For instance, such digital data may be transmitted as individual bits or, as is very often the case, as multi-bit data words. Such data words may also be encoded. An example of encoding would be the transformation of a four-bit data word into an encoded eight-bit word. Each of the methods of transmission mentioned has certain advantages and disadvantages, and the use of a particular form depends upon the requirements of the system in which it is to be utilized.
Likewise, a variety of hardware elements may be utilized to send and receive digital data communications, the exact nature of which are determined by the method, such as those described above, by which digital data which is to be sent or received, and the overall requirements of the system or systems which are utilizing the digital data communications. For instance, custom transmitters/receivers can be utilized if the associated systems which incorporate them can bear the costs associated with the development and production of custom hardware or, in the alternative, standard commercial devices such as UART's can also be utilized. Of course, these devices, and others which could be referenced, each have their associated advantages and disadvantages, depending on the application of interest.
The critical concern in designing a digital data communications system is finding a combination of the hardware and software elements mentioned above which meet the requirements of the system in which it is to be utilized. Meeting such requirements requires balancing of many factors, several of which include, the cost of the elements used to construct the system, error detection capability, transmission efficiency, including the efficiency of an encoding method if one is utilized, memory or other hardware components necessary to facilitate transmitting and receiving of digital data (e.g., to contain encoding/decoding algorithms), and other hardware or software characteristics which are associated with the overall system, such as whether AC coupling, DC coupling, or both, are to be utilized with the transmission media. It has been recognized that particular applications, such as a digital data communication system which could be utilized within a home to integrate the control of certain systems located within the home, as described in co-pending application "A System and Method for Automating the Control of a Space", by W. M. Wald, et al U.S. patent application Ser. No. 07/811,508, could be implemented, but would require a particular combination of hardware and software elements as described above. The functional requirements for this combination included the use of encoded data words, good error detection capabilities, the use of low cost, commercially available components, and the ability of the data communication system to accommodate DC coupling or AC coupling, and other application specific factors.
The present invention is a new combination of hardware and software elements, including an encoding method for creating a set of 8-bit code words from 4-bit data words which meets the criteria noted. This code can be transmitted and received through the use of standard UART's. The following is a discussion of art related to encoding of digital data, and the hardware which has been utilized to transmit and receive the encoded data.
With respect to encoding, one encoding method is known as non-return-to-zero (NRZ) encoding, and it is commonly used in serial data transmission systems. In one common use of this encoding method, a binary "1" value is represented as a positive voltage, and a binary "0" value is represented as a negative voltage and thus, strings of positive and negative voltage signals can be used to represent code words. Codes generated using this method are popular due to the fact that they are simple to encode and decode; however, a number of undesirable characteristics associated with typical NRZ generated codes make this type of encoding method unsuitable for many applications.
For example, standard NRZ encoding methods make no provisions for limiting the ratio of binary "1"s to binary "0"s sent over the transmission medium. In the case where a binary "1" is represented by a positive voltage, and a binary "0" is represented by a negative voltage, a long string of like digits (e.g., like voltages) can impose additional requirements on the overall digital data communications system. This occurs because, in instances where the data must be transmitted over a relatively long distance, the transmission medium, if it is a wire, has a certain capacitance and inductance. The transmission of a long string of like digits, either binary "1"s or "0"s, can effectively charge the transmission line. The result is that when the time comes to transmit a different digit, a higher power transmitter is required to effect the change in voltage on the transmission line necessary to produce the change of the digit. In the case where AC coupling is used with NRZ codes, such as to avoid ground loop problems in the transmission medium, NRZ coding does not work effectively. This is due to the fact that the AC coupling network is usually a high pass filter. Therefore, if a transmitted signal has a large "1"/"0" imbalance, and thus a large DC or low frequency component, this component will get filtered out, resulting in a distortion of the signal and a loss of information. Therefore, in certain applications, a DC balanced code is desirable, which occurs when an equal number of binary "1"s and "0"s are transmitted, however, NRZ encoding methods do not provide DC balanced codes.
Another often desired feature in data transmission systems which is not provided for in NRZ encoding methods is a run-length limit, which is the number of consecutive identical binary digits which may be found in a string of transmitted code words. The run-length limit is often represented as (d,k), where d is the minimum number, and k is the maximum number, of binary digits of the same value that may follow any given binary digit. To allow a code to be self-clocking and not require a separate clock signal the maximum number of consecutive binary digits must be minimized to increase the number of transitions in the signal. Although the feature of self-clocking generally requires a special clock-recovery circuit such as a phase-locked loop (PLL), it is generally preferred over having an additional transmission line connected to each device in the system. Similarly, a minimized run-length is at times desirable for the same reasons as the DC balance of the transmitted code is sometimes desirable. Longer strings of consecutive binary digits introduce lower frequency components to the transmitted signal, which can get filtered out in situations where AC coupling is used, and cause a distortion of the signal and a loss of information.
One type of encoding method which solves some of the above limitations associated with NRZ encoding methods is the Manchester encoding method and its variations. This type of encoding method represents binary values as signal transitions and produces a code which is guaranteed to have at least one transition per code word. This provides for a run-length limit of (0,1), which allows self-clocking with the addition of separate clock-recovery circuitry. It also provides for perfect DC balance. However, the Manchester encoding method is bit-oriented, which raises additional concerns. First, as most data transmission systems are byte-oriented, additional hardware or software is required to handle the conversion from a code generated under a bit-oriented encoding method to byte-oriented data words which the communicating devices can understand. This additional conversion, implemented in hardware or software, and coupled with clock-recovery hardware, has the effect of increasing the cost and complexity of such a system. Also, bit-oriented encoding methods are somewhat limited in the use of special control characters, as every code word maps directly to a data word. Control characters are often important in data communication networks to perform such tasks as identifying the beginning or end of a message, and the limitations with respect to control words can effect the efficiency of the system. Therefore, although the Manchester encoding method is sometimes desirable for use over the NRZ encoding methods, it still suffers from a number of limitations that decrease its desirability for use in certain data transmission systems.
Another alternate encoding method is group, or block, encoding. This encoding method maps a group of bits into a larger group, sacrificing some efficiency for enhanced features, including the use of control symbols, by choosing only those code words from the larger group that meet predetermined specifications. However, the system requirements and encoding efficiency of such codes often limit the number of code symbols that meet the predetermined communication requirements, so a compromise must be reached between system requirements, encoding efficiency and providing optimal transmission characteristics when using such codes.
Another feature which is often important to data transmission systems and can be accommodated by group codes, is error-detection. This advantage is demonstrated by the minimum Hamming distance of a code, where the Hamming distance is defined to be the number of variant bits between two code words in an encoding method. As the number of different bits between code words increases, so, too, does the probability that an error will be detected.
Rather than error-detection, though, much of the related art in this area has concentrated on methods of providing for DC balance. This may be due to the fact that in many systems, the additional memory required for error-detection is available, but in systems where cost is an important criteria, such memory is often not available. Nevertheless, related art may be classified into encoding methods providing inherent DC balance, encoding methods implementing alternate code words, and encoding methods providing separation bits between code words.
The inherently DC balanced encoding methods provide DC balancing through only selecting code words which have an equal number of "1"s and "0"s. Their main drawback is that efficiency of the code, in addition to such features as run-length limit and Hamming distance, usually are compromised to allow a sufficient number of DC balanced code words to be used. One example of such an encoding method is found in U.S. Pat. No. 4,924,463 of Thomas et al., which in one embodiment provides a 4B/6B (4-bit data word to 6-bit code word) code where all of the code words contain three binary "1"s and three binary "0"s to provide inherent DC balance. However, due to the limited number of code words which meet this limitation, the run-length limit for this encoding method is only (0,3), which can introduce lower frequency components into the transmitted signal, and consequently increase the requirements and cost of providing AC coupling.
The alternate code word method of encoding attempts to provide for DC balance and yet retain much of the other desired features of a good transmission code. Such a method involves selecting a first group of code words which meet the constraints of the predetermined characteristics such as run-length limit, etc. From this group, a second group of code words which have no DC component are then selected, and since the number of code words in this second group is usually less than the number of data words, two code words with opposite DC components are chosen for each of the remaining data words. During transmission, a running count of the DC component is stored, and when a data word mapped to alternate code words is encountered, the appropriate code word containing the DC component necessary to balance the system is utilized. Such a method is described in U.S. Pat. No. 4,811,361 of Bacou et al., where a generic m- to n-bit encoding method is disclosed. In its 8B/10B embodiment, data words are first mapped to code words containing five "1"s and five "0"s, with the remaining data words mapped to code words containing six "1"s and four "0"s. The complement of each of the unbalanced code words is used as the alternate word of opposite DC component. The disadvantage of this code, and those like it, is that additional hardware and processing time is required to generate the correct code word, which adds complexity and cost to the system.
Finally, encoding methods which employ separation bits between code words provide another method of obtaining a code with the desirable qualities noted above. A typical method of this type is described in U.S. Pat. No. 4,501,000 of Immink et al., where m-bit data words are encoded into n.sub.1 -bit code words, with n.sub.2 -bit separation blocks between code words to correct for run-length limit and DC imbalances. The major disadvantage to this type of encoding method is similar to the alternate code word method, in that the additional hardware and decision logic required to implement the method adds cost to the unit, and lowers the efficiency of the system.
Thus, with respect to group coding, the different methods of providing DC balance while retaining efficiency and optimal transmission characteristics tend to require greater or lesser amounts of hardware devoted to the generation of the code in order to give certain desirable features. With respect to the cost of such systems, such additional circuitry is undesirable; however, there are additional concerns with these methods. In addition to the hardware and decision processing that is required to implement DC balance in many of the above codes, additional custom hardware may be required to allow codes not based upon standard-sized groupings (4-, 8-, 16-bit words, etc.) to be implemented in a communication system. Most commercially available communication hardware is designed to work with standard quantities (4, 8, 16, bits, etc.), so conversion circuitry is required to allow the communication device to handle code words which are not based upon the standard-sized groupings.
A final concern with group encoding methods is the difficulty of the corresponding decoding method. Unlike the bit-oriented decoding methods, which simply must convert each code word transmitted over the system to its equivalent binary logic value, group decoding methods can be much more complex. For example, in a 4B/8B encoding method, the encoded words can include 256 possible values and must to decoded to one of 16 data values plus control characters. This requires the use of a look-up table or decoding algorithm, which may add additional hardware or software requirements, or both, to the digital data transmission system.
Therefore, although group encoding methods solve many of the problems associated with NRZ, Manchester, and other related encoding methods, they suffer from a number of problems that limit their desirability. The foremost problems associated with group encoding methods are the amount of additional hardware and processing that is required for their implementation and their inability to meet optimal data transmission characteristics such as perfect DC balance and minimum run-length limit. The addition of hardware or software, or both, to perform code conversion, generate code words, provide a clocking signal, and decode transmitted code words, can add cost and complexity to communication systems in which such codes are utilized. In some applications, the cost added to a system to perform these functions is not a limiting factor, and therefore these additional costs are acceptable. However, in some applications, such as the application described herein, even small costs are important, and codes, methods of generating such codes, and methods of transmitting and receiving such codes which tend to minimize additional hardware and software requirements, are needed.